<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/treeBox/treeBox.css">
    <script type="text/javascript" src="${ctx}/libjs/plugins/treeBox/treeBox.js"></script>

    <script type="text/javascript" src="${ctx}/appjs/system/rcMsg.js"></script>

    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/laydate.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/h-ui/css/H-ui.admin.css">
    <link rel="stylesheet" href="${ctx}/statics/css/update.css?v=20200825">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css?v=20200825">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.css">
    <script src="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.css">
    <script src="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.js"></script>
    <style>
        .treeBox .tree-active:hover {
            /*background:#a84747;*/
            color: #fff !important;
        }

        .treeBox a {
            color: #000;
            text-align: center !important;
        }

        .tree-active {
            background: #1e9fff;
            color: #fff !important;
        }

        .treeBox .tree-active:hover {
            background: #1e9fff;
            color: #fff !important;
        }

        .treeBox label {
            text-align: center;
        }

        .bootstrap-table .fixed-table-container .table thead th .th-inner {
            text-align: center !important;
        }

        .fixed-table-body-columns1 {
            width: 203px !important;
        }

        .fixed-table-toolbar {
            display: block;
            /*top: 37px;*/
            right: 90px;
            position: absolute;
            z-index: 100000;
        }
    </style>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>我的任务</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>消息通知表 </strong>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
    var StationManager_station_update = false;
    var StationManager_station_look = false;
</script>

<body class="gray-bg elecStationBody">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">

                    <div class="row">
                        <button class="btn btn-success input-distance" style="position: absolute;right: 50px;" onclick="station.clearMsg()">清空所有记录</button>
                    </div>
                <table id="exampleTable" data-mobile-responsive="true">
                </table>
            </div>
        </div>
    </div>
</div>



<script type="text/javascript">
    station.init();
</script>
<script>
    function selectByArea() {
        $.ajax({
            "type": "POST",
            "url": "${ctx}/elecStation/selectByArea",
            "data": {},
            "success": function (data) {
                console.log(data)
                treeBox({
                    el: '$(".focusEl")', //焦点或者点击事件DOM 必传可以是非input元素
                    // width:{ // 各级列表宽度 可选 不传默认值就为 160，160，160，200
                    //     lv1:160,
                    //     lv2:160,
                    //     lv3:160,
                    //     selected:200
                    // },
                    // selectedNum:3,// 设置可以选择多少个复选框 可选 不传默认3
                    // height:280, //高度 不传默认值 280
                    data: data, //数据 必传
                    topData: data,// 常用数据 可选
                    confirm: function (res) { //回调函数 必传 会以json的格式返回所选中的数据
                        if (res.length > 0) {
                            for (var k in res) {
                                $(".areaId").eq(k).val(res[k].value);
                            }
                        } else {
                            $(".areaId").val("");
                        }
                    }
                });
            }
        })
    }

    selectByArea()


</script>
</body>
<style>
    thead .operate-td{
    display: none;
}

</style>
</div>
</html>
<script>
    //下拉组件注册
    $(function () {
        $('#bizType').searchableSelect();
        $('#operateStatus').searchableSelect();
    })
    layui.use(['form', 'jquery', 'tree', 'laydate', 'util'], function () {});
</script>